home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / rstable / readme.txt < prev    next >
Encoding:
Text File  |  1998-07-31  |  5.1 KB  |  86 lines

  1. RSTable
  2. Version 0.09.0001
  3. Jeffrey P. McManus
  4. July 31, 1998
  5. ==================
  6.  
  7. Description
  8. -----------
  9. RSTable is an ActiveX DLL that converts an ActiveX Data Objects (ADO) Recordset object into an HTML table. You have some degree of control over how the table is formatted, and you have the choice of expressing the HTML output as an entire HTML page or simply as an HTML table (with the implication that you're going to use the HTML in the context of an already-existing HTML page).
  10.  
  11. This version of RSTable is distributed as freeware. It is copyright (c) 1998, Jeffrey P. McManus. Please send me email with questions or comments on this component. My email address is jeffreyp@sirius.com, and the home page for this component is http://www.redblazer.com/rstable.
  12.  
  13. The HTML output from this component has been tested with both Netscape Navigator 4.0 and Microsoft Internet Explorer 4.0. It should work with earlier versions of these browsers, as well as other browsers, with no problem.
  14.  
  15. The source code for this component is available. Email me for details.
  16.  
  17.  
  18. Obligatory Book Plug
  19. --------------------
  20. If you're interested in knowing more about ADO, integrating your Visual Basic project with the Web, or VB database programming in general, you'll want to check out my book, _Database Access in Visual Basic_. The home page for the book is http://www.redblazer.com/vbdb.
  21.  
  22.  
  23. Installation
  24. ------------
  25. Before this component will work on your system, it must be registered using the utility REGSVR32. A copy of this utility is included in the zip that contains the DLL. You can either run REGSVR32 manually or execute the batch file reg.bat to register RSTable on your computer. You can then use it as you would any other ActiveX library.
  26.  
  27. Because this component is specifically geared to use ADO recordsets, you'll need to install Microsoft Data Access Components on your system before using it. This library does *not* come with VB5 -- it's a free download from http://www.microsoft.com/data/ado. The library does ship with the Visual Studio 98 family of development tools, which includes Visual Basic 6.0.
  28.  
  29.  
  30. Using the Component
  31. -------------------
  32. In Visual Basic, begin by setting a reference to RSTable in the Project References menu. You can then use the component. The component is comprised of one class, called CTable. In Visual Basic, you use the CTable class by instantiating an object from it, like so:
  33.  
  34. Dim MyTable As CTable
  35. Set MyTable = New CTable
  36.  
  37. Set MyTable.Recordset = rs
  38. MyTable.Save "c:\windows\desktop\output.html"
  39.  
  40. The only other code you need for this to work is the code to create the ADO Recordset object (represented in the above code example as the object variable rs). How you go about creating that recordset is up to you.
  41.  
  42. To output an HTML table using VBScript (in the context of an Active Server Page application), use this code:
  43.  
  44. Set MyTable = CreateObject("RSTable.CTable")
  45.  
  46. Set MyTable.Recordset = rs
  47. Response.Write(MyTable.HTML)
  48.  
  49. Again, how you create the ADO Recordset object is up to you.
  50.  
  51.  
  52. Disclaimers and Warnings
  53. ------------------------
  54. No warranty, express or implied, is given with this software. Blah, blah, blah.
  55.  
  56. This component has been tested in VB5 only. It may work in other ActiveX-compliant development environments, although it hasn't been tested in them.
  57.  
  58.  
  59. Revision History
  60. ----------------
  61. July 26 1998 - Version 0.09.0001. Added FontSize property. Added EvenRowBackColor and OddRowBackColor properties. Raised error on export when no filename specified.
  62. April 5, 1998 - Initial release (version 0.09).
  63.  
  64.  
  65. Properties
  66. ----------
  67. BackColor (string) - The background color of the HTML page.
  68. Border (boolean) - Determines whether the HTML table displays a border.
  69. EvenRowBackColor (string) - The HTML color value for even rows.
  70. FieldNames (boolean) - Determines whether the HTML table displays field names.
  71. FieldNameBackColor (string) - The background color of the HTML table's field names.
  72. FieldNameFontBold (boolean) - Determines whether the HTML table's field names are bold.
  73. FieldNameFontColor (string) - The color of the text of the HTML table's field names.
  74. FileName (string) - The path and file name to save the exported HTML to.
  75. FontColor (string) - The color of the font.
  76. FontName (string) - The font of the page. Note that this is an HTML font face, which means that you can specify more than one font name (eg., "Arial, Helvetica") to accomodate users who may not have a particular font installed on their computers.
  77. FontSize (long) - a number from 1 to 6 specifying the size of the font. This is an HTML font size, not a point size.
  78. Header (boolean) - Determines whether to construct a complete, stand-alone HTML page (including HTML header tags such as <HTML> and <HEAD>) or just the table.
  79. HTML (string) - The HTML representation of the recordset.
  80. OddRowBackColor (string) - The HTML color value for odd rows.
  81. Recordset (ADODB.Recordset) - The ADO Recordset object to convert to HTML.
  82.  
  83.  
  84. Methods
  85. -------
  86. Save - Saves the HTML to a file on disk. You can either pass the filename as a parameter to the save method, or set the Filename property beforehand.